<template>
  <div>
    <!-- 单元格展示数据 -->
    <van-field
      label-width="9rem"
      label="拍号:"
      :value="this.ShowDataB.uniqueid"
      readonly
    />
    <van-field
      label-width="9rem"
      label="物料号:"
      :value="this.ShowDataB.productid"
      readonly
    />
    <van-field
      label-width="9rem"
      label="物料名称:"
      :value="this.ShowDataB.productname"
      readonly
    />
    <van-field
      label-width="9rem"
      label="生产日期:"
      :value="this.ShowDataB.productiondate.substring(0, 10)"
      readonly
    />
    <van-field
      label-width="9rem"
      label="生产推荐使用期至:"
      :value="this.ShowDataB.expdate.substring(0, 10)"
      readonly
    />
    <van-field
      label-width="9rem"
      label="供应商名称:"
      :value="this.ShowDataB.supplierid"
      readonly
    />
    <van-field
      label-width="9rem"
      label="生产商名称:"
      :value="this.ShowDataB.producerid"
      readonly
    />
    <van-field
      label-width="9rem"
      label="Mars批次:"
      :value="this.ShowDataB.batchno"
      readonly
    />
    <van-field
      label-width="9rem"
      label="供应商批次:"
      :value="this.ShowDataB.supplybatchno"
      readonly
    />

    <!-- 需要输入的值 -->
    <van-field
      label-width="9rem"
      v-model="this.ShowDataB.stockquantity"
      label="数量:"
      readonly
    />
    <van-field
      label-width="9rem"
      v-model="this.ShowDataB.unit"
      label="单位:"
      readonly
    />
    <!-- 按键 -->
    <van-button type="info" block @click="handleSubmit">确定</van-button>
  </div>
</template>

<script>
import "vant/lib/index.less";

export default {
  name: "orderNumber",
  data() {
    return {};
  },
  props: {
    ShowDataB: {
      type: Object,
    },
  },
  methods: {
    handleSubmit() {
      this.$emit("get-val");
    },
  },
  mounted() {
    if (this.ShowDataB.producerid == null) {
      this.ShowDataB.producerid = "";
    }
  },
};
</script>

<style scoped>
.van-field {
  border-bottom: 0.5px solid rgb(206, 204, 204);
  font-size: 1rem;
}
.van-button {
  margin-top: 3rem;
}
</style>